package com.neusoft.productsys.service;

import com.neusoft.productsys.dao.IProductDAO;
import com.neusoft.productsys.dao.impl.ProductDAOImpl;
import com.neusoft.productsys.entity.Product;

import java.util.List;

public class ProductService {

    private IProductDAO dao = new ProductDAOImpl();

    public List<Product> queryAll(){
        return dao.queryAll();
    }

    public List<Product> queryProductByNameandUnit(Product product){
        return dao.queryProductByNameandUnit(product);
    }

    public Product queryOneByID(Integer id){
        return dao.queryOneByID(id);
    }

    public int add_Product(Product product){
        return dao.add_Product(product);
    }

    public int del_Product(Integer id){
        return dao.del_Product(id);
    }

    public int modify_Product(Product product){
        return dao.modify_Product(product);
    }
}
